<%--사용안하는 페이지임 (jsp에서 바로 테이블을 이용하여 엑셀 다운로드(호환성 문제로 사용안함)--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%--jstl을 쓰기 위해 사용 --%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %><%--숫자 포맷을 사용하기 위해 사용 --%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"  prefix="fn"%><%--함수들을 이용하기 위해 사용 --%>
<%@ taglib prefix="c-rt" uri="http://java.sun.com/jstl/core_rt" %>  <%-- ie버전 확인에 쓰기 위해 씀 --%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<%
String fileName = "RA정보평가목록.xls";
fileName = new String(fileName.getBytes("UTF-8"), "8859_1"); 
response.setHeader("Content-Disposition", "attachment; fileName=\"" + fileName + "\";"); 
response.setHeader("Content-Transfer-Encoding", "binary"); 
	response.setHeader("Content-Description", "JSP Generated Data");
	response.setContentType("application/vnd.ms-excel;charset=utf-8");
%>
      		<table border=1>
      			<thead>
      				<tr bgcolor="#5c6467">
      					<td rowspan="2">정보명칭</td>
      					<td colspan="3">RA정보보안요구사항</td>
      					<td colspan="6">RA정보가치평가</td>
      				</tr>
      				<tr>
      					<td>기밀성</td>
      					<td>무결성</td>
      					<td>가용성</td>
      					<td>C</td>
      					<td>I</td>
      					<td>A</td>
      					<td>보안점수</td>
      					<td>보안등급</td>
      					<td>기밀등급</td>
      				</tr>
      			</thead>
      			<tbody>
      			<c:choose>
                    	<c:when test="${fn:length(list)!= 0}">
                       	<c:forEach var="list" items="${requestScope.list}" varStatus="status">
                   			<tr <c:if test="${status.index%2==0 }">bgcolor="#eaeaea"</c:if>>
                    			<td>
                    				${list.rainfo_nm }
                    			</td>
                    			<td>
                    				${list.c_memo }
                    			</td>
                    			<td>
                    				${list.i_memo }
                    			</td>
                    			<td>
                    				${list.a_memo }
                    			</td>
                    			<td>
                    				<c:if test="${list.ascu_level!=null }">
                    					<fmt:formatNumber value="${list.c_score }" pattern="0"/>
                    				</c:if>
                    			</td>
                    			<td>
                    				<c:if test="${list.ascu_level!=null }">
                    					<fmt:formatNumber value="${list.i_score }" pattern="0"/>
                    				</c:if>
                    			</td>
                    			<td>
                    				<c:if test="${list.ascu_level!=null }">
                    					<fmt:formatNumber value="${list.a_score }" pattern="0"/>
                    				</c:if>
                    			</td>
                    			<td>
                    				<c:if test="${list.ascu_level!=null }">
                    					<fmt:formatNumber value="${list.t_score }" pattern="0"/>
                    				</c:if>
                    			</td>
                    			<td>
                    				${list.ascu_level }
                    			</td>
                    			<td>
                    				${list.asc_level }
                    			</td>
                    		</tr>
                    		</c:forEach>
                    	</c:when>
                    	<c:otherwise>
                    		<tr bgcolor="#eaeaea">
								<td colspan="13" align="center">-데이터가 없습니다-</td>
							</tr>
                    	</c:otherwise>
                    	</c:choose>
      			</tbody>
      		</table>  	
</body>
</html>